<?php 
include_once(''.P.'/public/header.html');
?>



<script>
function initbody(){
	
}
function save(o1){
	var da = js.getformdata();
	da.type = '<?=$type?>';
	js.setmsg('保存中...');
	o1.disabled=true;
	js.ajax({
		type:'post',
		url:'?m=mycog&a=savecheck',
		data:da,
		success:function(res){
			o1.disabled=false;
			if(res=='ok'){
				js.setmsg('保存成功','green');
			}else{
				js.setmsg(res);
			}
		}
	});
}
</script>
<style>
.caidan{padding:10px;text-align:left;border-bottom:1px #eeeeee solid;cursor:pointer}
.caidan:hover{background-color:rgba(0,0,0,0.05)}
.caidan.active{background-color:rgba(0,0,0,0.06)}
</style>
</head>

<body>

<?php 
include_once(''.P.'/public/top_my.html');
?>

<div align="center">

<div style="width:<?=$maxwidth?>;margin:20px 0px" align="left">
	<div style="color:#cccccc">
		<a href="?m=index" class="zhu"><?=lang('admin.myhome')?></a> &gt;
		<a href="" class="zhu"><?=lang('admin.mycog')?></a>
	</div>
	
	<div class="mainbody">
	
	<table width="100%">
	<tr valign="top">
	<td>
	<div style="width:180px;background:#f9f9f9;min-height:500px;border-right:1px #f1f1f1 solid">
		
		<div class="caidan<?php if(isempt($type))echo ' active';?>">◇ <a href="?m=mycog">个人信息</a></div>
		<div class="caidan<?php if($type=='pass')echo ' active';?>">◇ <a href="?m=mycog&type=pass">密码修改</a></div>
	
	
		
	</div>
	</td>
	
	<td width="90%">
	
	<?php if(isempt($type)){?>
	<div style="padding:30px 30px">
		<form name="myform">
		<table>
		
		<tr>
			<td align="right" style="color:gray">头像：</td>
			<td>
			<img src="<?=$adminrs['face']?>" style="border-radius:50%" id="facess_img" width="80px" height="80px"><br>
			<input name="face" type="hidden" id="facess" class="input" value="">
			<button type="button" class="webbtn webbtn-mini" onclick="js.updateface('修改头像','facess')">修改</button>
			</td>
		</tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right" style="color:gray">用户名：</td><td><?=$adminrs['user']?></td></tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right" style="color:gray">注册时间：</td><td><?=$adminrs['regdt']?></td></tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right" style="color:gray">类型：</td><td><?php
		if($adminrs['type']=='0')echo '普通用户';
		if($adminrs['type']=='1')echo '平台管理员';
		?></td></tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right" style="color:gray">手机号：</td><td><?=$xhrock->getxings($adminrs['mobile'])?></td></tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right" style="color:gray">邮箱：</td><td><?=$adminrs['email']?></td></tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right" style="color:gray">姓名：</td><td><input name="name" type="text" value="<?=$adminrs['name']?>" style="width:260px" class="input"></td></tr>
		<tr><td height="10"></td></tr>
		
		<tr><td align="right"></td><td>
		<button type="button" onClick="save(this)" style="padding:8px 20px;border-radius:5px" class="webbtn" >保存</button>&nbsp;<span id="msgview"></span>
		</td></tr>
		
		
		</table>
	
		</form>
	</div>
	<?php }?>
	
	
	<?php if($type=='pass'){?>
	
	<div style="padding:50px;color:gray">可用APP，或者进入客户端去修改</div>
	
	<?php }?>
	
	
	</td>
	</tr>	
	</table>


	</div>
</div>



<?php 
include_once(''.P.'/public/footer.html');
?>
</div>

</body>
</html>